Integrand size = 23, antiderivative size = 484 \[ \int \frac {\cos ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\frac {2 \arctan \left (\frac {\sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 a^{2/3} \sqrt {a^{2/3}-b^{2/3}} d}-\frac {2 \arctan \left (\frac {\sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 \sqrt {a^{2/3}-b^{2/3}} b^{2/3} d}+\frac {2 \arctan \left (\frac {(-1)^{2/3} \sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}}}\right )}{3 a^{2/3} \sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}} d}-\frac {2 \arctan \left (\frac {\sqrt [3]{-1} \left (\sqrt [3]{b}+(-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{\sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}}}\right )}{3 a^{2/3} \sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}} d}+\frac {2 \text {arctanh}\left (\frac {\sqrt [3]{b}-\sqrt [3]{-1} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-(-1)^{2/3} a^{2/3}+b^{2/3}}}\right )}{3 \sqrt {-(-1)^{2/3} a^{2/3}+b^{2/3}} b^{2/3} d}+\frac {2 \text {arctanh}\left (\frac {\sqrt [3]{b}+(-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}}\right )}{3 \sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}} b^{2/3} d} \]
[Out]
Time = 0.69 (sec) , antiderivative size = 484, normalized size of antiderivative = 1.00, number of steps used = 24, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3305, 3292, 2739, 632, 210, 3299, 212} \[ \int \frac {\cos ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\frac {2 \arctan \left (\frac {\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+\sqrt [3]{b}}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 a^{2/3} d \sqrt {a^{2/3}-b^{2/3}}}-\frac {2 \arctan \left (\frac {\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+\sqrt [3]{b}}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 b^{2/3} d \sqrt {a^{2/3}-b^{2/3}}}+\frac {2 \arctan \left (\frac {\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+(-1)^{2/3} \sqrt [3]{b}}{\sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}}}\right )}{3 a^{2/3} d \sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}}}-\frac {2 \arctan \left (\frac {\sqrt [3]{-1} \left ((-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+\sqrt [3]{b}\right )}{\sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}}}\right )}{3 a^{2/3} d \sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}}}+\frac {2 \text {arctanh}\left (\frac {\sqrt [3]{b}-\sqrt [3]{-1} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b^{2/3}-(-1)^{2/3} a^{2/3}}}\right )}{3 b^{2/3} d \sqrt {b^{2/3}-(-1)^{2/3} a^{2/3}}}+\frac {2 \text {arctanh}\left (\frac {(-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+\sqrt [3]{b}}{\sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}}\right )}{3 b^{2/3} d \sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}} \]
[In]
[Out]
Rule 210
Rule 212
Rule 632
Rule 2739
Rule 3292
Rule 3299
Rule 3305
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1}{a+b \sin ^3(c+d x)}-\frac {\sin ^2(c+d x)}{a+b \sin ^3(c+d x)}\right ) \, dx \\ & = \int \frac {1}{a+b \sin ^3(c+d x)} \, dx-\int \frac {\sin ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx \\ & = -\int \left (\frac {1}{3 b^{2/3} \left (\sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)\right )}+\frac {1}{3 b^{2/3} \left (-\sqrt [3]{-1} \sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)\right )}+\frac {1}{3 b^{2/3} \left ((-1)^{2/3} \sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)\right )}\right ) \, dx+\int \left (-\frac {1}{3 a^{2/3} \left (-\sqrt [3]{a}-\sqrt [3]{b} \sin (c+d x)\right )}-\frac {1}{3 a^{2/3} \left (-\sqrt [3]{a}+\sqrt [3]{-1} \sqrt [3]{b} \sin (c+d x)\right )}-\frac {1}{3 a^{2/3} \left (-\sqrt [3]{a}-(-1)^{2/3} \sqrt [3]{b} \sin (c+d x)\right )}\right ) \, dx \\ & = -\frac {\int \frac {1}{-\sqrt [3]{a}-\sqrt [3]{b} \sin (c+d x)} \, dx}{3 a^{2/3}}-\frac {\int \frac {1}{-\sqrt [3]{a}+\sqrt [3]{-1} \sqrt [3]{b} \sin (c+d x)} \, dx}{3 a^{2/3}}-\frac {\int \frac {1}{-\sqrt [3]{a}-(-1)^{2/3} \sqrt [3]{b} \sin (c+d x)} \, dx}{3 a^{2/3}}-\frac {\int \frac {1}{\sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)} \, dx}{3 b^{2/3}}-\frac {\int \frac {1}{-\sqrt [3]{-1} \sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)} \, dx}{3 b^{2/3}}-\frac {\int \frac {1}{(-1)^{2/3} \sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)} \, dx}{3 b^{2/3}} \\ & = -\frac {2 \text {Subst}\left (\int \frac {1}{-\sqrt [3]{a}-2 \sqrt [3]{b} x-\sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^{2/3} d}-\frac {2 \text {Subst}\left (\int \frac {1}{-\sqrt [3]{a}+2 \sqrt [3]{-1} \sqrt [3]{b} x-\sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^{2/3} d}-\frac {2 \text {Subst}\left (\int \frac {1}{-\sqrt [3]{a}-2 (-1)^{2/3} \sqrt [3]{b} x-\sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^{2/3} d}-\frac {2 \text {Subst}\left (\int \frac {1}{\sqrt [3]{a}+2 \sqrt [3]{b} x+\sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 b^{2/3} d}-\frac {2 \text {Subst}\left (\int \frac {1}{-\sqrt [3]{-1} \sqrt [3]{a}+2 \sqrt [3]{b} x-\sqrt [3]{-1} \sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 b^{2/3} d}-\frac {2 \text {Subst}\left (\int \frac {1}{(-1)^{2/3} \sqrt [3]{a}+2 \sqrt [3]{b} x+(-1)^{2/3} \sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 b^{2/3} d} \\ & = \frac {4 \text {Subst}\left (\int \frac {1}{-4 \left (a^{2/3}-b^{2/3}\right )-x^2} \, dx,x,-2 \sqrt [3]{b}-2 \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^{2/3} d}+\frac {4 \text {Subst}\left (\int \frac {1}{-4 \left (a^{2/3}+\sqrt [3]{-1} b^{2/3}\right )-x^2} \, dx,x,-2 (-1)^{2/3} \sqrt [3]{b}-2 \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^{2/3} d}+\frac {4 \text {Subst}\left (\int \frac {1}{-4 \left (a^{2/3}-(-1)^{2/3} b^{2/3}\right )-x^2} \, dx,x,2 \sqrt [3]{-1} \sqrt [3]{b}-2 \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^{2/3} d}+\frac {4 \text {Subst}\left (\int \frac {1}{-4 \left (a^{2/3}-b^{2/3}\right )-x^2} \, dx,x,2 \sqrt [3]{b}+2 \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 b^{2/3} d}+\frac {4 \text {Subst}\left (\int \frac {1}{-4 \left ((-1)^{2/3} a^{2/3}-b^{2/3}\right )-x^2} \, dx,x,2 \sqrt [3]{b}-2 \sqrt [3]{-1} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 b^{2/3} d}+\frac {4 \text {Subst}\left (\int \frac {1}{4 \left (\sqrt [3]{-1} a^{2/3}+b^{2/3}\right )-x^2} \, dx,x,2 \sqrt [3]{b}+2 (-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 b^{2/3} d} \\ & = -\frac {2 \arctan \left (\frac {\sqrt [3]{-1} \sqrt [3]{b}-\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}}}\right )}{3 a^{2/3} \sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}} d}+\frac {2 \arctan \left (\frac {\sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 a^{2/3} \sqrt {a^{2/3}-b^{2/3}} d}-\frac {2 \arctan \left (\frac {\sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 \sqrt {a^{2/3}-b^{2/3}} b^{2/3} d}+\frac {2 \arctan \left (\frac {(-1)^{2/3} \sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}}}\right )}{3 a^{2/3} \sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}} d}+\frac {2 \text {arctanh}\left (\frac {\sqrt [3]{b}-\sqrt [3]{-1} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-(-1)^{2/3} a^{2/3}+b^{2/3}}}\right )}{3 \sqrt {-(-1)^{2/3} a^{2/3}+b^{2/3}} b^{2/3} d}+\frac {2 \text {arctanh}\left (\frac {\sqrt [3]{b}+(-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}}\right )}{3 \sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}} b^{2/3} d} \\ \end{align*}
Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
Time = 0.36 (sec) , antiderivative size = 231, normalized size of antiderivative = 0.48 \[ \int \frac {\cos ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=-\frac {i \text {RootSum}\left [-i b+3 i b \text {$\#$1}^2+8 a \text {$\#$1}^3-3 i b \text {$\#$1}^4+i b \text {$\#$1}^6\&,\frac {2 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right )-i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right )+4 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^2-2 i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^2+2 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^4-i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^4}{b \text {$\#$1}-4 i a \text {$\#$1}^2-2 b \text {$\#$1}^3+b \text {$\#$1}^5}\&\right ]}{6 d} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.89 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.17
method | result | size |
derivativedivides | \(\frac {\munderset {\textit {\_R} =\operatorname {RootOf}\left (a \,\textit {\_Z}^{6}+3 a \,\textit {\_Z}^{4}+8 b \,\textit {\_Z}^{3}+3 a \,\textit {\_Z}^{2}+a \right )}{\sum }\frac {\left (\textit {\_R}^{4}-2 \textit {\_R}^{2}+1\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\textit {\_R} \right )}{\textit {\_R}^{5} a +2 \textit {\_R}^{3} a +4 \textit {\_R}^{2} b +\textit {\_R} a}}{3 d}\) | \(83\) |
default | \(\frac {\munderset {\textit {\_R} =\operatorname {RootOf}\left (a \,\textit {\_Z}^{6}+3 a \,\textit {\_Z}^{4}+8 b \,\textit {\_Z}^{3}+3 a \,\textit {\_Z}^{2}+a \right )}{\sum }\frac {\left (\textit {\_R}^{4}-2 \textit {\_R}^{2}+1\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\textit {\_R} \right )}{\textit {\_R}^{5} a +2 \textit {\_R}^{3} a +4 \textit {\_R}^{2} b +\textit {\_R} a}}{3 d}\) | \(83\) |
risch | \(\munderset {\textit {\_R} =\operatorname {RootOf}\left (729 a^{4} b^{4} d^{6} \textit {\_Z}^{6}+27 a^{2} b^{2} d^{2} \textit {\_Z}^{2}+a^{2}-b^{2}\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {243 a^{4} b^{3} d^{5} \textit {\_R}^{5}}{a^{2}+b^{2}}+\frac {81 i d^{4} b^{3} a^{3} \textit {\_R}^{4}}{a^{2}+b^{2}}-\frac {27 d^{3} b^{3} a^{2} \textit {\_R}^{3}}{a^{2}+b^{2}}-\frac {9 i d^{2} b \,a^{3} \textit {\_R}^{2}}{a^{2}+b^{2}}-\frac {6 a^{2} b d \textit {\_R}}{a^{2}+b^{2}}+\frac {2 i a b}{a^{2}+b^{2}}\right )\) | \(178\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 1.63 (sec) , antiderivative size = 8236, normalized size of antiderivative = 17.02 \[ \int \frac {\cos ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {\cos ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\int \frac {\cos ^{2}{\left (c + d x \right )}}{a + b \sin ^{3}{\left (c + d x \right )}}\, dx \]
[In]
[Out]
\[ \int \frac {\cos ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\int { \frac {\cos \left (d x + c\right )^{2}}{b \sin \left (d x + c\right )^{3} + a} \,d x } \]
[In]
[Out]
\[ \int \frac {\cos ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\int { \frac {\cos \left (d x + c\right )^{2}}{b \sin \left (d x + c\right )^{3} + a} \,d x } \]
[In]
[Out]
Time = 15.55 (sec) , antiderivative size = 951, normalized size of antiderivative = 1.96 \[ \int \frac {\cos ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\frac {\sum _{k=1}^6\ln \left (24576\,a^4-24576\,a^2\,b^2-\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )\,a^2\,b^3\,122880-\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )\,a^5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,24576-32768\,a\,b^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+32768\,a^3\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-{\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )}^2\,a^2\,b^4\,294912+{\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )}^2\,a^4\,b^2\,294912+{\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )}^4\,a^4\,b^4\,663552-{\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )}^4\,a^6\,b^2\,663552-{\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )}^5\,a^4\,b^5\,7962624+{\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )}^5\,a^6\,b^3\,5971968+\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )\,a^4\,b\,49152+\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )\,a^3\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,147456+{\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )}^2\,a^5\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,294912-{\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )}^2\,a^3\,b^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,294912+{\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )}^3\,a^3\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1769472-{\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )}^3\,a^5\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1769472-{\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )}^4\,a^3\,b^5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,5308416+{\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )}^4\,a^5\,b^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,5308416-{\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )}^5\,a^5\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1990656-\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )\,a\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,196608\right )\,\mathrm {root}\left (729\,a^4\,b^4\,d^6+27\,a^2\,b^2\,d^2+a^2-b^2,d,k\right )}{d} \]
[In]
[Out]